import request from '@/utils/request'
import Cookies from 'js-cookie'
import { setPublishReadAcl } from '@/utils/baasDataFilter'

export function log(method, project, postData) {
  const data = {
    userId: Cookies.get('userId'),
    nickname: Cookies.get('nickname'),
    method: method,
    project: project,
    params: postData
  }
  setPublishReadAcl(data)
  const response = request({
    url: 'object/OPLog',
    method: 'post',
    data
  })
  return response
}
